package com.itbupt.domain.activity.adapter.repository;

import com.itbupt.domain.activity.model.entity.UserGroupBuyOrderDetailEntity;
import com.itbupt.domain.activity.model.valobj.GroupBuyActivityDiscountVO;
import com.itbupt.domain.activity.model.valobj.SCSkuActivityVO;
import com.itbupt.domain.activity.model.valobj.SkuVO;
import com.itbupt.domain.activity.model.valobj.TeamStatisticVO;

import java.util.List;

/**
 * @Author dingchang
 * @Date 2025/4/23 18:51
 * @Description: 活动仓储
 */
public interface IActivityRepository {

    // 根据商品ID查询商品信息
    SkuVO querySkuByGoodsId(String goodsId);

    // 查询具体的营销配置任务
    GroupBuyActivityDiscountVO queryGroupBuyActivityDiscountVO(Long activityId);

    // 查询渠道商品活动配置关联配置
    SCSkuActivityVO querySCSkuActivityBySCGoodsId(String source, String channel, String goodsId);

    // 判断用户是否在人群标签内
    boolean isTagCrowdRange(String tagId, String userId);

    // 判断是否降低
    boolean downgradeSwitch();

    // 判断用户是否在切量范围内
    boolean cutRange(String userId);

    // 获取拼团信息并组装拼团组队实体对象，共有 ownerCount条记录
    List<UserGroupBuyOrderDetailEntity> queryInProgressUserGroupBuyOrderDetailListByOwner(Long activityId, String userId, Integer ownerCount);

    // 获取拼团信息并组装拼团组队实体对象， 共有 randomCount条记录
    List<UserGroupBuyOrderDetailEntity> queryInProgressUserGroupBuyOrderDetailListByRandom(Long activityId, String userId, Integer randomCount);

    // 统计拼团队伍数据--开团队伍/成团队伍/参团人数数量
    TeamStatisticVO queryTeamStatisticByActivityId(Long activityId);

}
